package com.sc.test.arouter;

import android.os.Bundle;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.sc.test.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Shen Chao
 * Created by 2019-02-11
 */
@Route(path = "/app/resultActivity")
public class ARouterResultActivity extends AppCompatActivity {
    @BindView(R.id.tv_content)
    TextView tvContent;
    @Autowired
    String name;
    @Autowired
    int age;
    @Autowired
    boolean flag;
    //传递bean的时候要指定对象名
    @Autowired(name = "fatUser")
    UserBean user;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_arouter_result);
        ButterKnife.bind(this);
        //不加此句，永远没值
        ARouter.getInstance().inject(this);

        tvContent.setText(MessageBean.getMessage());
    }

}
